chore(all): enable tsconfig noUnusedLocals compiler option#17541
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
53a3211 to
a91cd64
Compare
There was a problem hiding this comment.
Pull request overview
This PR enables the noUnusedLocals TypeScript compiler option across all tsconfig.json files in the project to catch unused local variables during compilation, addressing a gap where @typescript-eslint/no-unused-vars was not reporting these issues.
Key Changes:
- Added
"noUnusedLocals": trueto 8 tsconfig.json files across different project directories - Removed an unused
linterVersionfield from the LinterTool class in the VSCode extension
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tasks/e2e/tsconfig.json | Added noUnusedLocals compiler option |
| plugins/tsconfig.json | Added noUnusedLocals compiler option |
| napi/transform/tsconfig.json | Added noUnusedLocals compiler option |
| napi/parser/tsconfig.json | Added noUnusedLocals compiler option |
| napi/minify/tsconfig.json | Added noUnusedLocals compiler option |
| editors/vscode/tsconfig.json | Added noUnusedLocals compiler option |
| editors/vscode/client/tools/linter.ts | Removed unused linterVersion property that was caught by the new compiler option |
| apps/oxlint/tsconfig.json | Added noUnusedLocals compiler option |
| apps/oxfmt/tsconfig.json | Added noUnusedLocals compiler option |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
noUnusedLocals compiler optionnoUnusedLocals compiler option
Merge activity
|
Unused local variables did not get reported by `@typescript-eslint/no-unused-vars`. Added `noUnusedLocals` check for every tsconfig, so `pnpm lint` will report them. Example of failed CI: https://github.com/oxc-project/oxc/actions/runs/20626453016/job/59237769046?pr=17541
a91cd64 to
e8e42eb
Compare

Unused local variables did not get reported by
@typescript-eslint/no-unused-vars.Added
noUnusedLocalscheck for every tsconfig, sopnpm lintwill report them.Example of failed CI: https://github.com/oxc-project/oxc/actions/runs/20626453016/job/59237769046?pr=17541